#!/opt/python-2.5/bin/python2.5

bgcolor = "333366"
text = "CCCCFF"
font = "Arial"
linkc = "9999FF"
vlinkc = "CC66CC"

import cgi, cgitb, os, sys
cgitb.enable()
print "Content-type: text/html;charset=utf-8"
print 
print "<body bgcolor=%s text=%s link=%s vlink=%s>" % (bgcolor, text, linkc, vlinkc)
LForm = cgi.FieldStorage()
if "Site" in LForm.keys():
	try:
		print "<script>"
		print "window.location = \"" + LForm["Site"].value + "\""
		print "</script>"
	except:
		print "Could not redirect to " + LForm["Site"] + ".  Please ensure that you typed it in correctly."
print "<font face=%s size=4><b>Link up with another site, such as:\n<br/></b></font>" % font
print "<font face=%s size=3>" % font
print "<li><a href=http://www.facebook.com>Facebook</a></li></br>"
print "<li><a href=http://www.blurty.com>Blurty</a></li></br>"
print "<li><a href=http://www.gotomeeting.com>GoToMeeting</a></li></br>"
print "...or type your preferred website here:</br>"
print "<form name=\"Linkup Form\" method=post>"
print "<input name=\"Site\" type=text size=30 maxlength=255 autocomplete/></br>"
print "<button type=submit name=\"Go\">Link up!</button></br>"
print "</form></font>"
print "</body>"
